#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("color.in","r",stdin);
	freopen("color.out","w",stdout);
	int n[1000001],a[1000001];
	int c,sum;
	cin>>n[1000001]>>a[1000001];
	for(int i,j;i,j<=n[1000001];i,j++){
		if(i==j){
			c=i;
			}
		else{
			c=0;
			}
		sum+=c;
		}
	cout<<sum<<end1;
	return 0;
	}
